import {get} from '../contstants/fetch-request'


export const getTask = (taskId:number) => {
    return (dispatch:Function) => {
      (async () => {
        const data = await get(`/api/v2/tasks/${taskId}`)
          dispatch({
            type: 'GET_TASK',
            data
          })
      })()
    }
  }
